// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsICacheInfoChannel.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    ///This Source Code Form is subject to the terms of the Mozilla Public
    /// License, v. 2.0. If a copy of the MPL was not distributed with this
    /// file, You can obtain one at http://mozilla.org/MPL/2.0/. </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("c5f583f0-ae53-4e39-8af9-2c2d0d7af093")]
	public interface nsICacheInfoChannel
	{
		
		/// <summary>
        /// Get expiration time from cache token. This attribute is equivalent to
        /// nsICachingChannel.cacheToken.expirationTime.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		uint GetCacheTokenExpirationTimeAttribute();
		
		/// <summary>
        /// Set/get charset of cache entry. Accessing this attribute is equivalent to
        /// calling nsICachingChannel.cacheToken.getMetaDataElement("charset") and
        /// nsICachingChannel.cacheToken.setMetaDataElement("charset").
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetCacheTokenCachedCharsetAttribute([MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aCacheTokenCachedCharset);
		
		/// <summary>
        /// Set/get charset of cache entry. Accessing this attribute is equivalent to
        /// calling nsICachingChannel.cacheToken.getMetaDataElement("charset") and
        /// nsICachingChannel.cacheToken.setMetaDataElement("charset").
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void SetCacheTokenCachedCharsetAttribute([MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aCacheTokenCachedCharset);
		
		/// <summary>
        /// TRUE if this channel's data is being loaded from the cache.  This value
        /// is undefined before the channel fires its OnStartRequest notification
        /// and after the channel fires its OnStopRequest notification.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool IsFromCache();
		
		/// <summary>
        /// Set/get the cache key... uniquely identifies the data in the cache
        /// for this channel.  Holding a reference to this key does NOT prevent
        /// the cached data from being removed.
        ///
        /// A cache key retrieved from a particular instance of nsICacheInfoChannel
        /// could be set on another instance of nsICacheInfoChannel provided the
        /// underlying implementations are compatible and provided the new
        /// channel instance was created with the same URI.  The implementation of
        /// nsICacheInfoChannel would be expected to use the cache entry identified
        /// by the cache token.  Depending on the value of nsIRequest::loadFlags,
        /// the cache entry may be validated, overwritten, or simply read.
        ///
        /// The cache key may be NULL indicating that the URI of the channel is
        /// sufficient to locate the same cache entry.  Setting a NULL cache key
        /// is likewise valid.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsISupports GetCacheKeyAttribute();
		
		/// <summary>
        /// Set/get the cache key... uniquely identifies the data in the cache
        /// for this channel.  Holding a reference to this key does NOT prevent
        /// the cached data from being removed.
        ///
        /// A cache key retrieved from a particular instance of nsICacheInfoChannel
        /// could be set on another instance of nsICacheInfoChannel provided the
        /// underlying implementations are compatible and provided the new
        /// channel instance was created with the same URI.  The implementation of
        /// nsICacheInfoChannel would be expected to use the cache entry identified
        /// by the cache token.  Depending on the value of nsIRequest::loadFlags,
        /// the cache entry may be validated, overwritten, or simply read.
        ///
        /// The cache key may be NULL indicating that the URI of the channel is
        /// sufficient to locate the same cache entry.  Setting a NULL cache key
        /// is likewise valid.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void SetCacheKeyAttribute([MarshalAs(UnmanagedType.Interface)] nsISupports aCacheKey);
	}
}
